﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Clinica/MasterPageAdmision.master" AutoEventWireup="true" CodeFile="wfCitaListado.aspx.cs" Inherits="Ventas_wfCitaListado" %>

<%@ Register assembly="DevExpress.Web.v11.2, Version=11.2.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxPanel" tagprefix="dx" %>
<%@ Register assembly="DevExpress.Web.ASPxEditors.v11.2, Version=11.2.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxEditors" tagprefix="dx" %>
<%@ Register assembly="DevExpress.Web.ASPxGridView.v11.2, Version=11.2.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxGridView" tagprefix="dx" %>

<%@ Register assembly="DevExpress.ExpressApp.Web.v11.2, Version=11.2.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.ExpressApp.Web.Templates" tagprefix="cc1" %>

<%@ Register assembly="DevExpress.Web.v11.2, Version=11.2.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxPopupControl" tagprefix="dx" %>

<%@ Register assembly="DevExpress.Web.v11.2, Version=11.2.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxPopupControl" tagprefix="dx1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <style type="text/css">

        .style1
        {
            width: 100%;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentMenuSecundario" Runat="Server">
    <li><a href="wfAdmisionPacienteListado.aspx" class="">Admisión Paciente</a></li>
    <li><a href="wfCitaListado.aspx" class="active">Cita</a></li>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ModuleTitleContent" Runat="Server">
    Cita
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="ContentEnlacesRapidos" Runat="Server">
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="MainContent" Runat="Server">
    <ul class="tabs primary">
        <li class="active"><a href="wfCitaListado.aspx">Listado de Citas</a></li>
        <li><a href="wfCita.aspx" class="">Registrar Cita</a></li>
    </ul>
    <h4>Listado de Citas</h4>
    <script language="javascript" type="text/javascript">

        function confirmSubmit() {
//            $.prompt('Está seguro de querer eliminar la cita?'
//            , {
//                buttons: { Ok: true, Cancel: false }
//                , prefix: 'cleanblue'
//                , callback: confirmSubmitResult
//            }
//        );
            //            return false;

            pcEliminar.Show();
        }

        function confirmSubmitResult() {
//            if (v) //post back if the user clicked OK
                $('#<%= btnAnulacion.ClientID %>').click();
        }    
    </script>
    <script type="text/javascript">
    // <![CDATA[
        function ShowMensaje() {
            pc_Mensaje.Show();
        }
//        function ShowCreateAccountWindow() {
//            pcCreateAccount.Show();
//            tbUsername.Focus();
//        }
    // ]]> 
    </script>
    <table width="99%">
        <tr>
            <td>
                <dx:ASPxPanel ID="ASPxPanel1" runat="server" Width="99%">
                    <PanelCollection>
                        <dx:PanelContent ID="PanelContent1" runat="server" SupportsDisabledAttribute="True">
                            <table>
                                <tr>
                                    <td>
                                        <dx:ASPxButton ID="ASPxButton1" runat="server" ClientIDMode="AutoID" CssFilePath="~/App_Themes/PlasticBlue/{0}/styles.css"
                                            CssPostfix="PlasticBlue" SpriteCssFilePath="~/App_Themes/PlasticBlue/{0}/sprite.css"
                                            Text="Agregar" OnClick="ASPxButton1_Click">
                                        </dx:ASPxButton>
                                    </td>
                                    <td>
                                        <dx:ASPxButton ID="ASPxButton2" runat="server" ClientIDMode="AutoID" CssFilePath="~/App_Themes/PlasticBlue/{0}/styles.css"
                                            CssPostfix="PlasticBlue" SpriteCssFilePath="~/App_Themes/PlasticBlue/{0}/sprite.css"
                                            Text="Modificar" OnClick="ASPxButton2_Click">
                                        </dx:ASPxButton>
                                    </td>
                                    <%--<td>
                                        <dx:ASPxButton ID="ASPxButton3" runat="server" ClientIDMode="AutoID" 
                                            CssFilePath="~/App_Themes/PlasticBlue/{0}/styles.css" CssPostfix="PlasticBlue" 
                                            OnClick="ASPxButton3_Click" 
                                            SpriteCssFilePath="~/App_Themes/PlasticBlue/{0}/sprite.css" 
                                            Text="Eliminar" Native="True">
                                        </dx:ASPxButton>
                                    </td>--%>
                                    <td>
                                        <dx:ASPxButton ID="btnAnular" runat="server" AutoPostBack="False" ClientIDMode="AutoID"
                                            CssFilePath="~/App_Themes/PlasticBlue/{0}/styles.css" CssPostfix="PlasticBlue"
                                            SpriteCssFilePath="~/App_Themes/PlasticBlue/{0}/sprite.css" 
                                            Text="Eliminar">
                                            <ClientSideEvents Click="function(s, e) {
	return confirmSubmit();
}" />
                                        </dx:ASPxButton>
                                    </td>
                                    <td>
                                    <asp:Button ID="btnAnulacion" runat="server" BackColor="#99CCFF" Style="display: none;"
                                                Text="Anular" OnClick="btnAnulacion_Click" />
                                    </td>
                                </tr>
                            </table>
                        </dx:PanelContent>
                    </PanelCollection>
                </dx:ASPxPanel>
            </td>
        </tr>
        <tr>
            <td>
                <dx:ASPxGridView ID="dgListadoCita" runat="server" AutoGenerateColumns="False" 
                    KeyFieldName="CIT_ID_CITA" >
                    <Columns>
                        <dx:GridViewDataTextColumn FieldName="CIT_ID_CITA" VisibleIndex="0" 
                            Caption="Nº Cita" SortIndex="0" SortOrder="Descending">
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataDateColumn FieldName="CIT_FECHA" VisibleIndex="1" 
                            Caption="Fecha">
                        </dx:GridViewDataDateColumn>
                        <dx:GridViewDataTextColumn FieldName="PAC_APELLIDO_PATERNO" VisibleIndex="2" 
                            Caption="Apellido Paterno">
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn FieldName="PAC_APELLIDO_MATERNO" VisibleIndex="3" 
                            Caption="Apellido Materno">
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn FieldName="PAC_NOMBRES" VisibleIndex="4" 
                            Caption="Nombres">
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn FieldName="ESC_DESCRIPCION" VisibleIndex="6" 
                            Caption="Estado">
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn FieldName="PRM_DESCRIPCION" VisibleIndex="8" 
                            Caption="Dia">
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn FieldName="TUR_DESCRIPCION" VisibleIndex="9" 
                            Caption="Turno">
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn FieldName="HOR_HORARIO" VisibleIndex="10" 
                            Caption="Horario">
                        </dx:GridViewDataTextColumn>
                    </Columns>
                    <SettingsBehavior AllowFocusedRow="True" />
                    <SettingsPager>
                        <AllButton Text="All">
                        </AllButton>
                        <NextPageButton Text="Next &gt;">
                        </NextPageButton>
                        <PrevPageButton Text="&lt; Prev">
                        </PrevPageButton>
                    </SettingsPager>
                    <Settings ShowFilterRow="True" ShowGroupPanel="True" />
                </dx:ASPxGridView>
                <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" 
                    SelectMethod="listarVista" TypeName="Negocio.Clases_BL.clsAdmCitaBL">
                </asp:ObjectDataSource>
                <asp:ScriptManager ID="ScriptManager1" runat="server">
                </asp:ScriptManager>



                <dx1:ASPxPopupControl ID="pcEliminar" runat="server" Width="350px" 
                    AllowDragging="True" AllowResize="True" ClientInstanceName="pcEliminar" 
                    CloseAction="CloseButton" HeaderText="Eliminar" 
                    Modal="True" PopupHorizontalAlign="WindowCenter" 
                    PopupVerticalAlign="WindowCenter" DragElement="Window">
                    <HeaderImage Url="~/Imagenes/delete2.png" Width="20px">
                    </HeaderImage>
                    <HeaderStyle Font-Bold="True" BackColor="#3D5294" ForeColor="White" />
                    <ContentCollection>
<dx1:PopupControlContentControl runat="server" SupportsDisabledAttribute="True">
    <table class="style1">
        <tr>
            <td colspan="2" style="padding: 0 0 0 20px;">
                Está seguro de querer eliminar el empleado?<hr /></td>
        </tr>
        <tr>
            <td align="right" style="padding: 0 20px 0 0;">
                
                <dx:ASPxButton ID="btnAceptarEliminar" runat="server" AutoPostBack="False" 
                    ClientIDMode="AutoID" Text="Aceptar" 
                    Checked="True">
                    <ClientSideEvents Click="function(s, e) {
	pcEliminar.Hide();
	confirmSubmitResult();    
}" />
                    <CheckedStyle BackColor="#000066" Font-Bold="True" Font-Names="Georgia" 
                        ForeColor="White">
                    </CheckedStyle>
                    <HoverStyle BackColor="#000099" Font-Bold="True" Font-Names="Georgia" 
                        ForeColor="White">
                    </HoverStyle>
                </dx:ASPxButton>
            
            </td>
            <td align="left" style="padding: 0 0 0 20px;">
            
                <dx:ASPxButton ID="btnCancelarEliminar" runat="server" AutoPostBack="False" 
                    ClientIDMode="AutoID" 
                    Text="Cancelar" Checked="True">
                    <ClientSideEvents Click="function(s, e) {
	pcEliminar.Hide();
}" />
                    <CheckedStyle BackColor="#000066" Font-Bold="True" Font-Names="Georgia" 
                        ForeColor="White">
                    </CheckedStyle>
                    <HoverStyle BackColor="#000099" Font-Bold="True" Font-Names="Georgia" 
                        ForeColor="White">
                    </HoverStyle>
                </dx:ASPxButton>
            
            </td>
        </tr>
    </table>
                        </dx1:PopupControlContentControl>
</ContentCollection>
                </dx1:ASPxPopupControl>



                <dx1:ASPxPopupControl ID="pcMensaje" runat="server" Width="350px" 
                    AllowDragging="True" AllowResize="True" ClientInstanceName="pcMensaje" 
                    CloseAction="CloseButton" HeaderText="Mensaje" 
                    Modal="True" PopupHorizontalAlign="WindowCenter" 
                    PopupVerticalAlign="WindowCenter" DragElement="Window">
                    <HeaderImage Url="~/Imagenes/iconError.png" Width="20px">
                    </HeaderImage>
                    <HeaderStyle Font-Bold="True" BackColor="#3D5294" ForeColor="White" />
                    <ContentCollection>
<dx1:PopupControlContentControl runat="server" SupportsDisabledAttribute="True">
    <table class="style1">
        <tr>
            <td style="padding: 0 0 0 20px;">
                <dx:ASPxLabel ID="lblMensaje" runat="server">
                </dx:ASPxLabel><hr />
            </td>
        </tr>
        <tr>
            <td align="center">
                
                <dx:ASPxButton ID="btnAceptar" runat="server" AutoPostBack="False" 
                    ClientIDMode="AutoID" Text="Aceptar" 
                    Checked="True">
                    <ClientSideEvents Click="function(s, e) {
	pcMensaje.Hide();   
}" />
                    <CheckedStyle BackColor="#000066" Font-Bold="True" Font-Italic="False" 
                        Font-Names="Georgia" Font-Strikeout="False" ForeColor="White">
                    </CheckedStyle>
                    <HoverStyle BackColor="#000099" Font-Bold="True" Font-Names="Georgia" 
                        ForeColor="White">
                    </HoverStyle>
                </dx:ASPxButton>
                
                
                </td>
        </tr>
    </table>
                        </dx1:PopupControlContentControl>
</ContentCollection>
                </dx1:ASPxPopupControl>



                <br />



            </td>
        </tr>
    </table>
</asp:Content>

